{include file="include/headerFile"}
{include file="include/header"}
{include file="include/banner"}
<main>

	{volist name="pagePartList" id="pagePart"}

	{$pagePart.content|raw}

	{/volist}


	<!-- 新闻列表 -->
	<section class="index-s4">
		<div class="index-s4-mid w1600">
			<p class="index-s1-title">NEWS</p>
			<ul>
				{volist name='cmsCatList' id='vo'}
				<li class="{if $i == 1}active{/if}">{$vo.name}</li>
				{/volist}
			</ul>
			<div class="index-s4-kuang-mid">

				{volist name='cmsCatList' id='vo'}
				<div class="index-s4-kuang">
					<div class="index-s4-left">
						{volist name='$vo.cmsList' id='cms'}	
							<a class="index-s4-left-img" href="/{$cms.rewrite_url}.html" title="{$cms.seo_title}">
								<img src="{$cms.photo}" alt="{$cms.seo_title}" title="{$cms.seo_title}" />
							</a>
						{/volist}
					</div>

					<div class="index-s4-right">
						{volist name='$vo.cmsList' id='cms' key="k"}	
						<a class="index-s4-k {if $k == 1}active{/if}" href="/{$cms.rewrite_url}.html" title="{$cms.seo_title}">
							<p class="index-s4-k-title" title="">{$cms.title}</p>
							<p class="index-s4-k-data">
								<img src="/static/images/data.png" alt="{$cms.seo_title}" />
								{$cms.show_time | date="M j-y"}
							</p>
							<p class="index-s4-k-nr">
								{:strip_tags($cms.content)}
							</p>
						</a>
						{/volist}
 
					</div>
				</div>
				{/volist}


			</div>
			<a class="index-s4-ckgd" href="/news.html" title="">Uncover Details
				<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none"
					version="1.1" width="21.5" height="16.5" viewBox="0 0 21.5 16.5">
					<g>
						<g></g>
						<g>
							<path
								d="M0.75,9L20.75,9Q20.8239,9,20.8963,8.985589000000001Q20.9688,8.971178,21.037,8.94291Q21.1053,8.914641,21.1667,8.873602Q21.2281,8.832563,21.2803,8.78033Q21.3326,8.728097,21.3736,8.666678Q21.4146,8.605258,21.4429,8.537013Q21.4712,8.468767,21.4856,8.396318Q21.5,8.3238685,21.5,8.25Q21.5,8.1761315,21.4856,8.103682Q21.4712,8.031233,21.4429,7.962987Q21.4146,7.894742,21.3736,7.833322Q21.3326,7.771903,21.2803,7.71967Q21.2281,7.667437,21.1667,7.626398Q21.1053,7.585359,21.037,7.55709Q20.9688,7.528822,20.8963,7.514411Q20.8239,7.5,20.75,7.5L0.75,7.5Q0.6761315,7.5,0.603682,7.514411Q0.5312330000000001,7.528822,0.462987,7.55709Q0.394742,7.585359,0.333322,7.626398Q0.271903,7.667437,0.21967000000000003,7.71967Q0.16743699999999995,7.771903,0.126398,7.833322Q0.08535899999999996,7.894742,0.057089999999999974,7.962987Q0.028822000000000014,8.031233,0.014410999999999952,8.103682Q0,8.1761315,0,8.25Q0,8.3238685,0.014410999999999952,8.396318Q0.028822000000000014,8.468767,0.057089999999999974,8.537013Q0.08535899999999996,8.605258,0.126398,8.666678Q0.16743699999999995,8.728097,0.21967000000000003,8.78033Q0.271903,8.832563,0.333322,8.873602Q0.394742,8.914641,0.462987,8.94291Q0.5312330000000001,8.971178,0.603682,8.985589000000001Q0.6761315,9,0.75,9Z"
								fill-rule="evenodd" fill="currentColor" fill-opacity="1" />
						</g>
						<g>
							<path
								d="M14.164565,15.2812L14.164348,15.2815Q14.084557,15.3812,14.042279,15.5017Q14,15.6223,14,15.75L14.000001,15.7515Q14.000082,15.7923,14.004587,15.8328Q14.021062,15.9811,14.093024,16.111800000000002Q14.164985,16.2425,14.281479,16.3357Q14.381217,16.415399999999998,14.501745,16.457700000000003Q14.622272,16.5,14.75,16.5L14.75539712,16.5Q14.8390701,16.4994,14.920553,16.4804Q15.002036,16.4613,15.077322,16.424799999999998Q15.152607,16.3883,15.217994000000001,16.336100000000002Q15.28338,16.2839,15.335652,16.2185L15.335868,16.2183L21.33565,8.71852Q21.37526,8.66901,21.406,8.61355Q21.43673,8.55809,21.457720000000002,8.49826Q21.47871,8.43842,21.489359999999998,8.375910000000001Q21.5,8.313410000000001,21.5,8.25Q21.5,8.186589999999999,21.489359999999998,8.124089999999999Q21.47871,8.06158,21.457720000000002,8.00174Q21.43673,7.94191,21.406,7.88645Q21.37526,7.83099,21.33565,7.78148L15.335652,0.281479Q15.282953,0.21560599999999996,15.216939,0.16308599999999995Q15.150924,0.11056600000000005,15.074892,0.07402299999999995Q14.998859,0.03747999999999996,14.916609,0.01873999999999998Q14.8343586,0,14.750000430124,0Q14.7333616,0,14.7167397,0.0007380000000000164Q14.472436,0.01158300000000001,14.281479,0.16434800000000005Q14.215606,0.217047,14.163086,0.283061Q14.110566,0.349076,14.074023,0.425108Q14.03748,0.5011410000000001,14.01874,0.583391Q14,0.6656417,14,0.75Q14,0.7666381,14.000738,0.7832603Q14.011583,1.027564,14.164348,1.218521L19.78953,8.25L14.164565,15.2812Z"
								fill-rule="evenodd" fill="currentColor" fill-opacity="1" />
						</g>
					</g>
				</svg>
			</a>
		</div>
	</section>

	{include file='include/contactbox'/}
</main>
{include file="include/footer"}
{include file="include/footerFile"}
</body>
<script type="text/javascript" src="/static/js/swiper.js"></script>
<script type="text/javascript">
	var bannerswiper = new Swiper('.bannerswiper', {
		autoplay: {
			delay: 5000,
			disableOnInteraction: false,
		},
		speed: 500,
		spaceBetween: 30,
		effect: 'fade',
		loop: true, //必须
		pagination: {
			el: '.bannerswiper .swiper-pagination',
			clickable: true,
		},
	});
	
	
	var indexhzhb = new Swiper(".indexhzhb", {
		slidesPerView: 3,
		spaceBetween: 8,
		loop: true,
		speed: 2000, // 控制滚动速度
		autoplay: {
		    delay: 0, // 无间隔
			disableOnInteraction: false,
			pauseOnMouseEnter: true,
		},
		navigation: {
			nextEl: ".swiper-button-next",
			prevEl: ".swiper-button-prev",
		},
		breakpoints: {
			1024: {
				slidesPerView: 8,
				spaceBetween: 18,
			},
			768: {
				slidesPerView: 7,
				spaceBetween: 10,
			}
		}
	});

	// shoufengqin
	let canTrigger = true;
	let lastIndex = -1;
	$(".index-s1-div > a").on("mouseenter", function () {
		const currentIndex = $(this).index();

		// 若当前元素相同 or 未解锁，不触发
		if (!canTrigger || currentIndex === lastIndex) return;

		canTrigger = false;
		lastIndex = currentIndex;

		$(this).addClass("active").siblings().removeClass("active");

		setTimeout(() => {
			canTrigger = true;
		}, 500); // 0.5 秒节流
	});

	// 外层tab切换
	$(".index-s4-kuang").hide().eq(0).show();
	$(".index-s4-mid > ul > li").click(function () {
		const index = $(this).index();
		$(".index-s4-kuang").hide();
		$(".index-s4-kuang").eq(index).stop(true, true).fadeIn(200);
		$(this).addClass("active").siblings().removeClass("active");
	});

	// 每个index-s4-kuang内部的图片hover切换（作用于当前容器内部）
	$(".index-s4-kuang").each(function () {
		const $kuang = $(this);
		const $imgs = $kuang.find(".index-s4-left-img");
		const $items = $kuang.find(".index-s4-k");

		$imgs.hide().eq(0).show();
		$items.hover(function () {
			const index = $(this).index();
			$imgs.stop(true, true).fadeOut(0).eq(index).stop(true, true).fadeIn(200);
			$(this).addClass("active").siblings().removeClass("active");
		});
	});


	document.addEventListener("DOMContentLoaded", function () { //shuzigundong
		const counters = document.querySelectorAll(".counter");

		const animateCount = (el) => {
			const target = +el.getAttribute("data-target");
			const duration = 2000;
			const frameRate = 30;
			const totalSteps = Math.ceil(duration / frameRate);
			let current = 0;
			let step = target / totalSteps;

			const updateCounter = () => {
				current += step;
				if (current < target) {
					el.textContent = Math.floor(current).toLocaleString();
					setTimeout(updateCounter, frameRate);
				} else {
					el.textContent = target.toLocaleString();
				}
			};

			updateCounter();
		};

		const observer = new IntersectionObserver((entries, obs) => {
			entries.forEach(entry => {
				if (entry.isIntersecting) {
					const el = entry.target;
					animateCount(el);
					obs.unobserve(el); // 防止重复触发
				}
			});
		}, {
			threshold: 1.0
		});

		counters.forEach(counter => {
			observer.observe(counter);
		});
	});



	$(function () {
		let index = 0;
		let timer = null;
		const $items = $('.weizhi');
		const length = $items.length;

		function showItem(i) {
			$items.removeClass('active').eq(i).addClass('active');
		}

		function startLoop() {
			timer = setInterval(function () {
				index = (index + 1) % length;
				showItem(index);
			}, 2000); // 每2秒切换
		}

		function stopLoop() {
			clearInterval(timer);
		}

		// 启动轮播
		showItem(index);
		startLoop();

		// 悬停当前项时暂停轮播，移开后继续
		$items.hover(
			function () {
				stopLoop();
				index = $(this).index(); // 切到当前项
				showItem(index);
			},
			function () {
				startLoop();
			}
		);
	});
</script>

</html>